<template>
  <div class="full flex-center gap-1 cursor-pointer">
    <ElImage :src="logo" class="hfull flex items-center w-35px">
      <template #placeholder>
        <div>加载中...</div>
      </template>
      <template #error>
        <img src="@/assets/imgs/def.png" class="w-35px" />
      </template>
    </ElImage>
    <span v-show="label" class="hfull flex items-center">{{ label }}</span>
  </div>
</template>
<script setup lang="ts">
  import { ElImage } from 'element-plus';

  defineProps<{logo?: string, label?: string}>()
</script>